USE [NLKHCNData]
GO

/****** Object:  View [dbo].[SearchChuyenGiaView]    Script Date: 12/26/2014 12:22:18 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO



ALTER VIEW [dbo].[SearchChuyenGiaView]
AS
SELECT        ISNULL(CT.Id, 0) AS CongTrinhId, CG.Id, CG.HoTen, CG.Ten, CG.DiaChiDonVi, HH.Ten AS TenHocHam, HV.Ten AS TenHocVi, CG.TenDonVi, CG.HocHamId, CG.HocViId, 
                         LV.Ten AS TenLinhVuc, CG.LinhVucId, CT.TenCongTrinh, CG.ChuyenNganhId
FROM            dbo.ChuyenGia AS CG LEFT OUTER JOIN
                         dbo.LinhVuc AS LV ON CG.LinhVucId = LV.Id LEFT OUTER JOIN
                         dbo.HocHam AS HH ON CG.HocHamId = HH.Id LEFT OUTER JOIN
                         dbo.HocVi AS HV ON CG.HocViId = HV.Id LEFT OUTER JOIN
						 dbo.CongTrinhNghienCuu AS CT ON CG.Id = CT.ChuyenGiaId
						 



GO


